package com.oo.inherit_3.company;

/**
 * employee--${description}
 *
 * @author: Jovi
 * @createTime: 2017-05-09 10:12
 **/
public class Employee {

    private String name;

    private int age;

    private String sex;

    private String duty;

    private Department department;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getDuty() {
        return duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    public Employee(String name, int age, String sex, String duty, Department department) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.duty = duty;
        this.department = department;
    }

    protected void intro() {
        System.out.println("大家好，我叫"+this.getName()
        +"，今年"+this.getAge()+"岁\n我现在任职在"+this.getDepartment().getName()+"，是"+this.getDuty());
    }
}
